﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="/static/css/table.css"
			type="text/css"></link>
		<script type="text/javascript"
			src="/static/javascript/comm/comm.js">
		</script>
		
		<script type="text/javascript" src="/static/javascript/jquery-1.7.2.js"></script>
		
		<script type="text/javascript">
			function deleteThirdKind(id){
				$.ajax({
				
					url:"/HR_Fist/customiz/customizAction!doDeleteThirdKind",
					data:"cftk.ftkId="+id,
					dataType:"text",
					success:function (){
						alert("删除成功！");
						location.reload();
					},
					type:"post"
				});
			}
		</script>
		<!--以下3个js库必须按照顺序引入-->
		<!--vue脚本库-->
		<script type="text/javascript"
				src="/static/js/vue-3.2.4.global.js">
			<!--axios脚本库-->
		</script>
		<script type="text/javascript"
				src="/static/js/axios-0.18.0.min.js">
		</script>
		<!--我们自己封装的axios函数库 -->
		<script type="text/javascript"
				src="/static/js/axios-helper.js">
		</script>
	</head>

<script type="text/javascript">
	
		function submission(){
			document.forms[0].submit();
		}
		
		function page(currentPage){
			document.getElementById("pid").value=currentPage;
			document.forms[0].submit();
		}
		
</script>

	<body id="app">
		<form action="../customiz/customizAction!findThirdKind" method="post">
			<table width="100%">
				<tr>
					<td>
						<font color="black">您正在做的业务是：人力资源--客户化设置--人力资源档案管理设置--III级机构设置
						</font>
					</td>
				</tr>
				<tr>
					<td align="right">
						<input type="button" value="添加" class="BUTTON_STYLE1"
							onclick="window.location.href='third_kind_register.html'" />
					</td>
				</tr>
			</table>
			<table width="100%" border="1" cellpadding=0 cellspacing=1
				bordercolorlight=#848284 bordercolordark=#eeeeee
				class="TABLE_STYLE1">
				<tr>
					<td width="14%" class="TD_STYLE1">
						I级机构名称
					</td>
					<td width="14%" class="TD_STYLE1">
						II级机构名称
					</td>
					<td width="14%" class="TD_STYLE1">
						II级机构编号
					</td>
					<td width="14%" class="TD_STYLE1">
						III级机构名称
					</td>
					<td width="17%" class="TD_STYLE1">
						销售责任人编号
					</td>
					<td width="17%" class="TD_STYLE1">
						是否为零售店
					</td>
					<td width="5%" class="TD_STYLE1">
						变更
					</td>
					<td width="5%" class="TD_STYLE1">
						删除
					</td>
				</tr>
					
					<tr v-for="thr in ConfigFileThirdKindList">
						<td class="TD_STYLE2">{{thr.firstKindName}}
						</td>
						<td class="TD_STYLE2">{{thr.secondKindName}}
						</td>
						<td class="TD_STYLE2">{{thr.secondKindId}}
						</td>
						<td class="TD_STYLE2">{{thr.thirdKindName}}
						</td>
						<td class="TD_STYLE2">{{thr.thirdKindSaleId}}
						</td>
						<td class="TD_STYLE2">{{thr.thirdKindIsRetail}}
						</td>
						<td class="TD_STYLE2">
							<a href="javascript:void(0)" @click="change(thr.ftkid)">变更</a>
						</td>
						<td class="TD_STYLE2">
							<a href="javascript:void(0)" @click="del(thr.ftkid)" >删除</a>
						</td>
					</tr>
			</table>
			<br>
			<br>
			<th colspan="7" class="pager">
			 	</th>
			<p>
		</form>
	</body>
	<script type="module">
		Vue.createApp({
			data(){
				return{
					//三级机构设置对象数组
					ConfigFileThirdKindList:[]
				}
			},
			methods:{
				//查询三级机构设置
				loadConfigFileThirdKindList(){
					requestGet("/configFileThirdKind/queryList").then((data)=>{
						console.info(data);
						this.ConfigFileThirdKindList=data;
					})
				},
				//删除
				del(ftkid){
					requestDelete("/configFileThirdKind/del",{
						ftkid:ftkid
					}).then((data)=>{
						if(data.statusCode==1){
							window.location.href="/templates/page/client/third_delete_success.html";
						}else{
							alert("删除失败");
						}
					})
				},
				//单值查询 转递id 跳转至修改页面
				change(ftkid){
					sessionStorage.setItem("ftkid",ftkid);
					window.location.href="/templates/page/client/third_kind_change.html";
				}
			},
			created(){
				this.loadConfigFileThirdKindList();
			}
		}).mount("#app");
	</script>
</html>

